package com.ytkj.digitalConstruction.entity.user;

import java.util.Date;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotBlank;

public class User {
    private Integer userId;

    @NotBlank(message="用户名不能为空！")
    @Size(min = 0, max = 50, message = "用户名长度小于等于50个字符")
    private String userName;

    @Size(max = 15, message = "密码不能大于15个字符")
    private String passwd;

    @NotBlank(message = "用户姓名不能为空")
	@Size(min = 0, max = 20, message = "用户姓名长度不大于20个字符串")
    private String name;

    @Size(max = 50, message = "头像最多为50个字符")
    private String headUrl;

    @Size(max = 50, message = "职位不能长于50个字符")
    private String position;

    @NotBlank(message = "电话号码不能为空！")
	@Size(max = 50, message = "电话号码不能超过50个字符")
    private String tel;

    @NotBlank(message = "手机号不能为空！")
	@Size(max = 50, message = "手机号不能长于50个字符")
    private String mobile;

    @Size(max = 50, message = "邮箱不能长于50个字符")
    private String email;

    @Min(value = -1, message = "用户状态为-1或1")
	@Max(value = 1, message = "用户状态为-1或1")
    private Integer status;

    private Date lastLogin;

    private Boolean isManager;

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName == null ? null : userName.trim();
    }

    public String getPasswd() {
        return passwd;
    }

    public void setPasswd(String passwd) {
        this.passwd = passwd == null ? null : passwd.trim();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getHeadUrl() {
        return headUrl;
    }

    public void setHeadUrl(String headUrl) {
        this.headUrl = headUrl == null ? null : headUrl.trim();
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position == null ? null : position.trim();
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel == null ? null : tel.trim();
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile == null ? null : mobile.trim();
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getLastLogin() {
        return lastLogin;
    }

    public void setLastLogin(Date lastLogin) {
        this.lastLogin = lastLogin;
    }

    public Boolean getIsManager() {
        return isManager;
    }

    public void setIsManager(Boolean isManager) {
        this.isManager = isManager;
    }
}